﻿using RecruitmentAgency.Models.DataProviders;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RecruitmentAgency.Models;
using RecruitmentAgency.Models.DataTypes;
using System.ServiceModel.Syndication;

namespace RecruitmentAgency.Tests.Models.DataProviders
{
    /// <summary>
    ///This is a test class for JobDataProviderTest and is intended
    ///to contain all JobDataProviderTest Unit Tests
    ///</summary>
    [TestClass]
    public class JobDataProviderTest
    {
        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }                      
      
        /// <summary>
        ///A test for GetJobRssFeed
        ///</summary>        
        [TestMethod()]        
        public void GetJobRssFeedTest()
        {
            JobDataProvider target = new JobDataProvider(); 
            string homePageUri = string.Empty; 
            SyndicationFeed expected = null;
            SyndicationFeed actual = target.GetJobRssFeed(homePageUri);
            Assert.AreNotEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for SearchJobs
        ///</summary>
        [TestMethod()]
        public void SearchJobsTest()
        {
            JobDataProvider target = new JobDataProvider(); 
            int pageSize = 0; 
            int pageNumber = 0; 
            string jobTitle = string.Empty; 
            string jobDescription = string.Empty; 
            string closingDate = string.Empty;
            string jobSector = "IT";
            string expected = "IT";             
            string actual = target.SearchJobs(pageSize, pageNumber, jobTitle, jobDescription, closingDate, "IT").JobSector;
            Assert.AreNotEqual(expected, actual);            
        }

        /// <summary>
        ///A test for UpdateJob
        ///</summary>
        [TestMethod()]
        public void UpdateJobTest()
        {
            JobDataProvider target = new JobDataProvider(); // TODO: Initialize to an appropriate value
            Job job = null; // TODO: Initialize to an appropriate value
            target.UpdateJob(job);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for DataContext
        [TestMethod()]
        public void DataContextTest()
        {
            JobDataProvider_Accessor target = new JobDataProvider_Accessor(); // TODO: Initialize to an appropriate value
            RecruitmentDatabaseDataContext actual;
            actual = target.DataContext;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}